-- GENERATED SPELL FOR [Young Forest Bear] --


function spell0_822(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16828,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_822', 630, 1)
end

function spell1_822(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_822', 0, 1)
end

function spell2_822(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(2649,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_822', 0, 1)
end

function spell3_822(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14916,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_822', 0, 1)
end

function spell4_822(pUnit, Event) --@Swipe,n/a--
pUnit:FullCastSpellOnTarget(50256,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_822', 0, 1)
end

function Sorts_822(pUnit, Event)
local choix_sorts_822 = math.random(0, 4)
if choix_sorts_822 == 0 then
pUnit:RegisterEvent('spell0_822', 1, 1)
end
if choix_sorts_822 == 1 then
pUnit:RegisterEvent('spell1_822', 1, 1)
end
if choix_sorts_822 == 2 then
pUnit:RegisterEvent('spell2_822', 1, 1)
end
if choix_sorts_822 == 3 then
pUnit:RegisterEvent('spell3_822', 1, 1)
end
if choix_sorts_822 == 4 then
pUnit:RegisterEvent('spell4_822', 1, 1)
end
end

function mob822_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_822', math.random(1500, 3000), 1)
end

function mob822_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob822_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob822_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(822, 1, 'mob822_Action')
RegisterUnitEvent(822, 2, 'mob822_Leave')
RegisterUnitEvent(822, 3, 'mob822_Kill')
RegisterUnitEvent(822, 4, 'mob822_Die')
